<%-- 
    Document   : validasi
    Created on : Jan 2, 2014, 11:57:47 PM
    Author     : brlnt
--%>
<%@page import="model.PelaporanBean"%>
<%@page import="java.util.List"%>
<%@include file="../template/header.jsp"%>
<div class="row">
    <div class="col-lg-7 col-lg-push-1">
        <%
            List listdata;
            listdata = (List) request.getAttribute("listdata");
            int n = 1;
        %>
        <% if (listdata != null) {%>
        <h3>${title}</h3>
        <hr>
        <% 
            if(request.getAttribute("message") != null){
        %>
            ${message}
        <%
            }
        %>
<table id="table" cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered">
    <thead>
    <th>No</th>
    <th>Nama Sungai</th>
    <th>Lokasi</th>
    <th>Tanggal Pelaporan</th>
    <th>Action</th>
</thead>
<tbody>
    <%      
        for (int i = 0; i < listdata.size(); i++) {
            PelaporanBean data = (PelaporanBean) listdata.get(i);
            if (data.getStatus() == 0) {
        %>
        <tr>
            <td><%=n++%></td>
            <td><%=data.getNamasungai()%></td>
            <td><%=data.getLokasisungai()%></td>
            <td><%=data.getTanggal()%></td>
            <td>
                <a href="?action=valid&id=<%=data.getIdPelaporan()%>" class="btn btn-primary" >
                    <i class="glyphicon glyphicon-check"></i> Validasi
                </a> 
            </td> 
        </tr>
        <% }%>
        <% }%>
        </tbody>
        </table>
        <% }

    
    
else { %>
        Tidak ada Pelaporan yang belum tervalidasi.
        <% } %>
    </div>
</div>
<%@include file="../template/footer.jsp"%>
